package com.orange.singlePatterns;

import com.orange.decoratorPatterns.BlueBuff;
import com.orange.decoratorPatterns.RedBuff;
import com.orange.decoratorPatterns.SimplePerson;
import org.apache.ibatis.mapping.CacheBuilder;
import org.junit.Test;

import java.io.BufferedInputStream;

/**
 * @Description: 装饰器模式测试单元
 */
public class DecoratorPatterns {
    //测试创建一个有红有蓝的勇者
    @Test
    public void HaveBlueAndRedTest(){
        //简单人
        SimplePerson simplePerson = new SimplePerson();
        //添加红
        RedBuff redBuff = new RedBuff(simplePerson);
        //添加蓝
        BlueBuff blueBuff = new BlueBuff(redBuff);
        //攻击
        blueBuff.attrack();

    }
}
